/**
 * @file UseFlash.h
 * @brief 
 * @author xuesong (wenshaoliu@foxmail.com)
 * @version 1.0
 * @date 2024-11-25
 * 
 * @copyright Copyright (c) 2024  by xuesong
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-11-25     <td>1.0     <td>xuesong   <td>内容
 * </table>
 */

#ifndef __USE_FLASH_H__
#define __USE_FLASH_H__


#ifdef __cplusplus
extern "C" {
#endif
#define PAGE_SIZE     4096

int flash_read_page(unsigned long addr, unsigned long len, unsigned char *buf);
int flash_write_page(unsigned long addr, unsigned long len, unsigned char *buf);
void flash_erase_sector(unsigned long addr);
void fullTestFlashBin(void);

#ifdef __cplusplus
}
#endif

#endif /* cTestFlash.h */